import http from '../https'
const baseURL = "http://82.157.143.31:8080"

//部门管理获取数据，页码
const setDepartment = (index, pageSize) => http({
    url: `${baseURL}/empManager/dept/selectDept`,
    method: 'get',
    params: { index, pageSize }
})
//部门管理新增
const addDEpartment = (dept) => http({
    url: `${baseURL}/empManager/dept/addDept`,
    method: 'post',
    data: dept
})
//部门管理删除
const delDEpartment = (dept) => http({
    url: `${baseURL}/empManager/dept/deleteDeptById`,
    method: 'post',
    data: dept
})
//职位管理获取数据，页码
const setPosition = (index, pageSize) => http({
    url: `${baseURL}/empManager/position/selectPosition`,
    method: 'get',
    params: { index, pageSize }
})
//职位管理新增
const addPosition = (dept) => http({
    url: `${baseURL}/empManager/position/addPosition`,
    method: 'post',
    data: dept
})
//职位管理删除
const delPosition = (dept) => http({
    url: `${baseURL}/empManager/position/deletePositionById`,
    method: 'post',
    data: dept
})
//用户管理,在线用户获取数据，页码
const setuserControl = (index, pageSize) => http({
    url: `${baseURL}/empManager/employee/selectForPage`,
    method: 'get',
    params: { index, pageSize }
})
export { setDepartment, addDEpartment, setPosition, setuserControl, delDEpartment ,addPosition,delPosition}